package com.cskaoyan.javase.oop3._2inner._2static._2classload;

/**
 * 测试静态内部类和外围类的类加载
 *
 * @since 11:21
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        // 创建静态内部类A的对象
        // A a = new A();

        // 创建外围类EnclosedClazz的静态内部类对象
        EnclosedClazz.A a = new EnclosedClazz.A();
    }
    /*static {
        System.out.println("外围类Demo,类加载了!");
    }*/
    /*static class A{
        static {
            System.out.println("静态内部类A,类加载了!");
        }
    }*/
}

class EnclosedClazz {
    static {
        System.out.println("外围类EnclosedClazz,类加载了!");
    }

    static class A {
        static {
            System.out.println("静态内部类A,类加载了!");
        }
    }
}
